package com.senseu.utils;

import io.appium.java_client.AppiumDriver;
import io.qameta.allure.Attachment;
import org.openqa.selenium.OutputType;

public class AllureLogUtil {
    @Attachment(value = "{0}", type = "text/plain")
    public static String attachTextLog(String title, String message) {
        return message;
    }

    @Attachment(value = "失败截图", type = "image/png")
    public static byte[] takeScreenshot(AppiumDriver driver) {
        return driver.getScreenshotAs(OutputType.BYTES);
    }
}
